jQuery(function($) {
	//设置登陆页面的背景
	$('body').attr('class', 'login-layout blur-login');
	$('#id-text2').attr('class', 'white');
	$('#id-company-text').attr('class', 'light-blue');

	var account, password;
	$("#loginBtn").click(function() {
		account = $.trim($("#account").val());
		password = $.trim($("#password").val());
		if (account == "" || password == "") {
			alert("账号和密码不能为空");
		}
		$.ajax({
			type : "post",
			url : "login.do",
			dataType : "json",
			data : {
				"account" : account,
				"password" : password
			},
			success : function(data) {
				if(data.status == "SUCCESS"){
					document.location.href = "main.do";
				}else{
					alert(data.message);
				}
			}
		});
	});
});